package com.dlwx.firefighting.adapter;

import android.content.Context;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.dlwx.firefighting.R;
import com.dlwx.firefighting.bean.UserOrderBean;


/**
 * Created by Administrator on 2017/6/16.
 */

public class OrderGoodsAdapter extends ListBaseAdapter<UserOrderBean.GoodsBean> {
    private Context context;

    public OrderGoodsAdapter(Context context) {
        super(context);
        this.context=context;
    }

    @Override
    public int getLayoutId() {
        return R.layout.item_order_goods;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder, int position) {
        UserOrderBean.GoodsBean bean=getDataList().get(position);
        ImageView imageView=holder.getView(R.id.goods_img);
        TextView priceTv=holder.getView(R.id.goods_money_tv);
        TextView titleTv=holder.getView(R.id.goods_title_tv);
        TextView integralTv=holder.getView(R.id.goods_integral);
        TextView numTv=holder.getView(R.id.num_tv);
        TextView tagTv=holder.getView(R.id.tag);

//
        Glide.with(context).load(bean.getGoods_thumb()).error(R.mipmap.error_small).into(imageView);
        priceTv.setText(context.getString(R.string.rmb)+bean.getGoods_price());
        titleTv.setText(bean.getGoods_name());
        numTv.setText(context.getString(R.string.x)+bean.getGoods_number());
      /*    exponentTv.setText(bean.getGoods_brief());
        tagTv.setText(bean.getTag_words());
      salesVolumeTv.setText(bean.getBuy_sum()+"销量");
        evaluateTv.setText(bean.getComment_count()+"人评价");*/





    }
}
